package com.homework.dianqi;

/**
 * @author xiyu
 * @version 1.0
 * @date 2025/4/3 16:35
 * @description
 *  用户名不能重复
 *  密码长度不能少于6位
 */
public class User {
    private String userName;
    private String passWord;
    private String otherName;//别名
    private int age;

    public User(String userName, String passWord, String otherName, int age) {
        this.userName = userName;
        this.passWord = passWord;
        this.otherName = otherName;
        this.age = age;
    }

    public User() {
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getPassWord() {
        return passWord;
    }

    public void setPassWord(String passWord) {
        this.passWord = passWord;
    }

    public String getOtherName() {
        return otherName;
    }

    public void setOtherName(String otherName) {
        this.otherName = otherName;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    @Override
    public String toString() {
        return "User{" +
                "userName='" + userName + '\'' +
                ", passWord='" + passWord + '\'' +
                ", otherName='" + otherName + '\'' +
                ", age=" + age +
                '}';
    }
}
